﻿using System.Collections;
using UnityEngine;


public class MonsterStateFightIdle : FSMState
{
    private float _timeWait;

    public override void Enter()
    {
        _timeWait = Time.time + Random.Range(0.5f,1.5f);
    }

    public override void Exit()
    {
        
    }

    public override void Update()
    {
        if (Time.time < _timeWait)
        {
            return;
        }

        fsm.role.FindTarget();

        if (fsm.role.target != null)
        {
            fsm.SetState("Pursuit");
        }
    }
}